#ifndef LABELING_H_INCLUDED
#define LABELING_H_INCLUDED
#include "image.h"

class Labeling{

private:
    int labels;
    void StartL( int seed);
    int LabelPix ( int i, int j, int* L,unsigned int row,unsigned int col, bool **imgpbm,unsigned int **imgpgm,unsigned int **equiv);
    void SetEquiv (unsigned int **equiv, int L);
    int GetClass ( int l,unsigned int **equiv);
    void Transitivity(unsigned int **equiv, int L);
    void Reflexitivity(unsigned int **equiv, int L);
    void Sub(unsigned int **equiv,unsigned int **equivf, int L);
public:
    Grey_Image* labeling(Binary_Image *img);
    Labeling();
};


#endif // LABELING_H_INCLUDED
